//
// Created by Castle on 2025/10/27.
//

#include <iostream>
using namespace std;

int main() {
    // 一个三位正整数，输出其个位、十位和百位数字之和
    int number,ge,shi,bai;
    cin >> number;
    ge = number % 10;
    shi = number / 10 % 10;
    bai = number / 100 % 10;
    cout << ge + shi + bai << endl;

    return 0;
}